#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b[5];
	cin>>a;
	b[1]=a/1000;
	b[2]=a/100%10;
	b[3]=a%100/10;
	b[4]=a%10;
	if(b[1]==b[4]&&b[2]==b[3])
	cout<<"Yes";
	else
	cout<<"No";
    return 0;
}

